//
//  member_overload_operator.hpp
//  learnC++
//
//  Created by apple on 2018/6/4.
//  Copyright © 2018年 yunfan.com. All rights reserved.
//

#ifndef member_overload_operator_hpp
#define member_overload_operator_hpp

#include <stdio.h>
#include <iostream>

class CentsThree
{
private:
    int m_cents;
    
public:
    CentsThree(int cents) { m_cents = cents; }

    // Overload Cents + int
    CentsThree operator+(int value);
    friend CentsThree operator-(CentsThree &v1,CentsThree &v2);
//    赋值（=），下标（[]），函数调用（（））和成员选择（ - >）运算符重载为成员函数，因为他们需要对象来调用如：
    //    CentsThree t(1);
//        t= / t[] / t() / t->
    
    //好像没什么意义
    CentsThree operator<<(int value);
    
    
    
    int getCents() { return m_cents; }
};



#endif /* member_overload_operator_hpp */
